home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / MacFormat 92 CD / Shareware Plus / Utilities / FolderSynchronizer 1.8.9 / FoldersSynchronizer / FoldersSynchronizer.9 / AllScripts_9_Menus.ls < prev    next >
Encoding:
Text File  |  2000-05-10  |  1.0 KB  |  45 lines

  1. on Menu_____________________________
  2. end
  3.  
  4. on InitMenu
  5.   global gSyncPermitted
  6.   installMenu(member "MyMenuList")
  7.   if the frameLabel = "Lista" then
  8.     SetMenuLista()
  9.   else
  10.     SetMenuCredits()
  11.   end if
  12. end
  13.  
  14. on SetMenuLista
  15.   global gSyncPermitted
  16.   set the enabled of menuItem 1 of menu 1 to 1
  17.   SetMenuFile(1)
  18.   ableMenu("Options", 1)
  19. end
  20.  
  21. on SetMenuCredits
  22.   set the enabled of menuItem 1 of menu 1 to 0
  23.   SetMenuFile(0)
  24.   ableMenu("Options", 0)
  25. end
  26.  
  27. on SetMenuFile vSetting
  28.   global gSyncPermitted
  29.   set the enabled of menuItem 1 of menu "File" to vSetting
  30.   set the enabled of menuItem 2 of menu "File" to vSetting
  31.   set the enabled of menuItem 3 of menu "File" to gSyncPermitted and (the frameLabel = "Lista")
  32.   set the name of menuItem 3 of menu "File" to MyOperationBtn()
  33. end
  34.  
  35. on ableMenu theMenu, vSetting
  36.   set n to the number of menuItems of menu theMenu
  37.   repeat with i = 1 to n
  38.     set the enabled of menuItem i of menu theMenu to vSetting
  39.   end repeat
  40. end
  41.  
  42. on SetMenuWindows
  43.   installMenu(member "MyMenuWindow")
  44. end
  45.